<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

	<!-- Appenders -->
	<appender name="console" class="org.apache.log4j.ConsoleAppender">
		<param name="Threshold" value="all"/>
		<param name="Target" value="System.out" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%-5p: %c - %m%n" />
		</layout>
	</appender>
	
    <appender name="myFile" class="org.apache.log4j.RollingFileAppender">    
        <param name="File" value="${log4jdir}/output.log" /><!-- 设置日志输出文件名 -->  
        <!-- 设置是否在重新启动服务时，在原有日志的基础添加新日志 -->  
        <param name="Append" value="true" /> 
        <param name="Threshold" value="all"/> 
        <param name="MaxBackupIndex" value="10" />  
        <layout class="org.apache.log4j.PatternLayout">  
            <param name="ConversionPattern" value="%p (%c:%L)- %m%n" />  
        </layout>  
    </appender>
	
	<!-- Application Loggers -->
	<logger name="com.homeinns.*">
		<level value="info" />
	</logger>
	<logger name="com.mchange.v2.c3p0">
		<level value="warn" />
	</logger>
	<logger name="net.sf.ehcache">
		<level value="warn" />
	</logger>
	<logger name="org.apache.*">
		<level value="warn" />
	</logger>	
	<!-- 3rdparty Loggers -->
	
	<logger name="org.springframework.*">
		<level value="all" />
	</logger>

	<!-- 
	<logger name="org.springframework.beans">
		<level value="info" />
	</logger>
	
	<logger name="org.springframework.context">
		<level value="info" />
	</logger>

	<logger name="org.springframework.web">
		<level value="info" />
	</logger>
	 -->


	<!-- Root Logger -->
	<root>
		<priority value="all" />
		<appender-ref ref="console" />
	</root>
	
</log4j:configuration>
